<head>
  <meta name="layout" content="main"/>
  <title>Upload Icon</title>
</head>

<body>
<div class="span-30 inner">
  <div class="nav">
    <span class="menuButton"><g:link action="edit">Edit Account</g:link></span>
    <span class="menuButton"><g:link action="icon">Upload Icon</g:link></span>
  </div>

  <h1>Upload Icon</h1>
  <g:if test="${flash.message}">
    <div class="message">${flash.message}</div>
  </g:if>
  <g:hasErrors bean="${account}">
    <div class="errors">
      <g:renderErrors bean="${account}" as="list"/>
    </div>
  </g:hasErrors>

  <g:uploadForm action="upload" method="post">
    <input type="hidden" name="id" value="${account.id}"/>
    <input type="hidden" name="version" value="${account.version}"/>
    <div class="dialog">
      <table>
        <tbody>
        <tr class="prop">
          <td valign="top" class="name"><label for="icon">Icon:</label></td>
          <td valign="top" class="value"><input type="file" id="icon" name="icon"/></td>
          <td valign="top" class="value"><mw:icon username="${account.username}"/></td>
        </tr>
        </tbody>
      </table>
    </div>
    <div class="buttons">
      <span class="button"><input class="save" type="submit" value="Upload"/></span>
    </div>

  </g:uploadForm>
</div>
</body>
